#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

void test01() {
    vector<vector<int>> arr;
    for (int i = 0; i < 4; i++) {
        vector<int> v;
        for (int j = 0; j < 5; j++) {
            v.push_back(i * 5 + j);
        }
        arr.push_back(v);
    }
    for (int i = 0; i < arr.size(); i++) {
        for (int j = 0; j < arr[i].size(); j++) {
            cout << arr[i][j] << " ";
        }
        cout << endl;
    }
}

void test02() {
    vector<vector<int>> arr;
    vector<int> v1;
    vector<int> v2;
    vector<int> v3;
    vector<int> v4;
    for (int i = 0; i < 4; i++) {
        v1.push_back(i);
        v2.push_back(i + 1);
        v3.push_back(i + 2);
        v4.push_back(i + 3);
    }
    arr.push_back(v1);
    arr.push_back(v2);
    arr.push_back(v3);
    arr.push_back(v4);

    //遍历
    for (vector<vector<int>> :: iterator it = arr.begin(); it != arr.end(); it++) {
        for (vector<int> :: iterator it2 = (*it).begin() ; it2 != (*it).end(); it2++) {
            cout << *it2 << " ";
        }
        cout << endl;
    }
}
int main() {
    test01();
    cout << "----------------------------"<<endl;
    test02();
    return 0;
}